// ElementUI 国际化
import enLocale from 'element-ui/lib/locale/lang/en'

// 它将自动加载modules中所有js文件
const modulesFiles = require.context('./modules', true, /\.js$/)
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
  // const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
  // modules[moduleName] = value.default
  const value = modulesFiles(modulePath)
  modules = {...modules, ...value.default}
  return modules
}, {})

// 创建文件en.js
const en = {
  ...enLocale,
  ...modules,
  home: 'Home',
  loginNavTitle: 'Management',
  loginNavFoldTitle: 'M',
  loginFormTitle: 'Login System',
  loginFormButton: 'Login',
  loginFormUsernameHolder: 'Account',
  loginFormPasswordHolder: 'Password',
  loginFormCodeHolder: 'Code',
  mainContentCloseCurrentTab: 'Close Current Tab',
  mainContentCloseOtherTab: 'Close Other Tabs',
  mainContentCloseAllTab: 'Close All Tabs',
  mainContentRefreshCurrentTab: 'Refresh Current Tab',
  mainNavBarUpdatePwd: 'Update Password',
  mainNavBarUpdatePwdAccount: 'Account',
  mainNavBarUpdatePwdOriPwd: 'Original Password',
  mainNavBarUpdatePwdNewPwd: 'New Password',
  mainNavBarUpdatePwdConfirmNewPwd: 'Confirm New Password',
  mainNavBarUpdatePwdNotEq: 'Twice New Password not Sample',
  mainNavBarUpdatePwdOriEmt: 'Original Password is Empty',
  mainNavBarUpdatePwdNewEmt: 'New Password is Empty',
  mainNavBarUpdatePwdConEmt: 'Confirm New Password is Empty',
  mainNavBarLogout: 'Logout',
  mainNavBarLogoutConfirm: 'Confirm to proceed with [Exit] operation?',
  language: {
    zh: '简体中文',
    en: 'English'
  }
}
export default en
